<template>
    <div class="confirm-button">
        <button @click="getButtonClick">
            {{text || '确认'}}
        </button>
    </div>
</template>

<script>
export default {
    name: "confirm-button",
    props:["text"],//父组件给子组件的值
    data(){
        return{
            msg:true
            
        }
    },
    methods:{
        getButtonClick(){
            this.$emit("message",this.msg);//向父组件传递值
        }
    }
}
</script>

<style>

</style>